<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('特殊渠道数据列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <input type="hidden" name="costomId" id="infoId" th:value="${infoId}" />
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>手机号：</label>
                                <input type="text" name="mobile"/>
                            </li>
                            <li>
                                <label>渠道编号：</label>
                                <input type="text" name="channelCode"/>
                            </li>
                            <li>
                                <label>渠道名称：</label>
                                <input type="text" name="channelName"/>
                            </li>
                            <li>
                                <label>客户跟踪：</label>
                                <input type="text" name="feedbackInfo" placeholder="模糊查询"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
             <!--   <a class="btn btn-success" onclick="manualPush();" shiro:hasPermission="special:info:manualPush">
                    <i class="fa fa-plus"></i> 手推
                </a>-->
<!--                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="special:data:edit">-->
<!--                    <i class="fa fa-edit"></i> 修改-->
<!--                </a>-->
<!--                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="special:data:remove">-->
<!--                    <i class="fa fa-remove"></i> 删除-->
<!--                </a>-->
<!--                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="special:data:export">-->
<!--                    <i class="fa fa-download"></i> 导出-->
<!--                </a>-->
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "special/data";

        $(function() {
            var options = {
                url: prefix + "/list",
                modalName: "机构数据",
                columns: [
                {
                    field: 'uid',
                    title: '用户Id',
                    formatter: function (value,row,index){
                        var result = '<span style="color: #1c84c6; border-bottom: 1px solid " onclick="memberInfoView(\''+row.uid+'\')">'+row.uid+'</span>';
                        return result;
                    }
                },
                {
                    field: 'username',
                    title: '姓名'
                },
                {
                    field: 'mobile',
                    title: '手机号'
                },
                {
                    field: 'province',
                    title: '省市',
                    formatter: function (value, row, index){
                        return row.province + '-' + row.city;
                    }
                },
                    {
                        field: 'channelName',
                        title: '渠道名称'
                    },
                    {
                        field: 'channelCode',
                        title: '渠道编号'
                    },
                    {
                        field: 'feedbackInfo',
                        title: '客户跟踪',
                       /* formatter: function(value, row, index) {
                            return $.table.tooltip(value);
                        }*/
                    },
                    {
                        field: 'createTime',
                        title: '创建时间'
                    },
                // {
                //     title: '操作',
                //     align: 'center',
                //     formatter: function(value, row, index) {
                //         var actions = [];
                //         actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                //         actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                //         return actions.join('');
                //     }
                // }
                ]
            };
            $.table.init(options);
        });

        function memberInfoView(uid){
            var url = ctx + "member/info/view/" + uid;
            $.modal.open('用户详情', url);
        }

        // function manualPush(){
        //     var id = $("#infoId").val();
        //     var url = ctx + 'special/info/manualPush/'+id;
        //     $.modal.openTab('手动推送', url);
        // }



    </script>
</body>
</html>